package com.gree.flowable.app.controller;

import com.gree.flowable.app.pojo.vo.ReturnVO;
import com.gree.flowable.app.services.IFlowableFormDetailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @author ：180849
 * @date ：Created in 2021/5/6 10:39
 * @description：审批表单信息
 * @modified By：
 * @version: 1.0
 */

@RestController
@RequestMapping("/rest/flowableFormDetail")
public class IFlowableFormDetailApi {
    @Autowired
    private IFlowableFormDetailService iFlowableFormDetailService;

    @GetMapping("/{taskId}")
    public ReturnVO getDetail(@PathVariable("taskId")String taskId) {
        return iFlowableFormDetailService.getProcessDetail(taskId);
    }

    @GetMapping("/{businessKey}/{nodeKey}")
    public ReturnVO getApplyedDetail(@PathVariable("businessKey")String businessKey, @PathVariable("nodeKey")String nodeKey) {
        return iFlowableFormDetailService.getProcessDetail(businessKey, nodeKey);
    }
}
